<script setup lang="ts">
import headers from "@/components/head/head.vue";
import bottom from "@/components/bottom/bottom.vue";
import { computed } from "vue";
import { useRoute } from "vue-router";
const route = useRoute();
const show = computed(() => {
  if (route.name == "login" || route.name == "video") {
    return false;
  } else {
    return true;
  }
});
const isMobile = () => {
  let flag = navigator.userAgent.match(
    /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
  );
  if (flag) {
    window.location.href = "/h5/login";
  }
};
isMobile();
</script>

<template>
  <div>
    <div v-if="show">
      <headers></headers>
    </div>
    <div class="relative pb-[168px] min-h-screen">
      <!-- <router-view :key="route.fullPath"></router-view> -->
      <router-view></router-view>
      <div class="w-full absolute bottom-0" v-if="show">
        <bottom></bottom>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.body {
  font-size: 16px;
}
</style>
